From bdc89b8452608b40f72f3e6c4c0914df312fa621 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Wed, 31 Jan 2024 05:04:31 -0800
Subject: feat(user): rainbow owner badge

---
 src/routes/user/[user]/+page.svelte | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

(limited to 'src/routes/user/[user]/+page.svelte')

diff --git a/src/routes/user/[user]/+page.svelte b/src/routes/user/[user]/+page.svelte
index 2c6c87cc..761ba1ee 100644
--- a/src/routes/user/[user]/+page.svelte
+++ b/src/routes/user/[user]/+page.svelte
@@ -7,6 +7,8 @@
 	import root from '$lib/Utility/root.js';
 	import locale from '$stores/locale.js';
 	import { onMount } from 'svelte';
+	import authorisedUsers from '$lib/Data/authorised.json';
+	import tooltip from '$lib/Tooltip/tooltip.js';
 
 	export let data;
 
@@ -71,8 +73,15 @@
 						<a
 							href={`https://anilist.co/user/${userData.name}`}
 							target="_blank"
-							title={String(userData.id)}>@{userData.name}</a
+							title={String(userData.id)}
+							use:tooltip
 						>
+							@{userData.name}
+						</a>
+						{#if userData && authorisedUsers.includes(userData.id)}
+							&#8204;
+							<button class="unclickable-button button-badge badge-rainbow">Owner</button>
+						{/if}
 						<span class="click-item">•</span>
 						<a href={root(`/user/${userData.name}/badges`)}>Badge Wall</a>
 					</p>
@@ -88,10 +97,10 @@
 					<p />
 
 					{#await fetch(root(`/api/badges?id=${userData.id}`))}
-						{displayBadges(userData.name, '…')}
+						{displayBadges(userData.name, '...')}
 					{:then badges}
 						{#await badges.json()}
-							{displayBadges(userData.name, '…')}
+							{displayBadges(userData.name, '...')}
 						{:then badges}
 							{displayBadges(userData.name, badges.length)}
 						{:catch}
-- 
cgit v1.2.3

